import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex);

export default new Vuex.Store({
    state: {
        nickName: "wsxedc",
        cartCount: 0
    },
    getters: {

    },
    mutations: {
        updateUserInfo(state, nickName) {
            state.nickName = nickName
        },
        updateCartCount(state, cartCount) {
            state.cartCount = cartCount
        },
        addCartCount(state, cartCount) {
            state.cartCount += cartCount
        }
    }
})